<?php if(null == $this->identity) exit();?>
<h3><?php echo $this->identity['fname'].' '.$this->identity['lname']?>'s Dashboard</h3>
<?php foreach($this->messages as $msg) 
{
	echo $msg.'<br/>';
}?>
<br/>
<a href="/post/create">+ Create a post</a>
<table>
	<caption>My Posts</caption>
	<thead>
		<tr>
			<th>ID</th>
			<th>Title</th>
			<th/>
			<th>Last Modified</th>
		</tr>
	</thead>
	<tbody>
	<?php foreach($this->postsPaginator as $temp):?>
		<tr style="background-color:<?php echo $this->cycle(array("#F0F0F0",
		                                                            "#FFFFFF"))
		                                              ->next()?>">
			<td width="10"><?php echo $this->escape($temp['id']) ?></td>                                    
			<td width="250"><?php echo $this->escape($temp['title']) ?></td>
			<td>
				<a href="/post/edit/id/<?php echo $this->escape($temp['id']) ?>">E</a>
				&nbsp;&nbsp;&nbsp;
				<a href="/post/delete/id/<?php echo $this->escape($temp['id']) ?>">D</a>
			</td>
			<td><?php echo Blogger_Utilities::dateFormatter($temp['lastModified']) ?></td>  
		</tr>
	<?php endforeach;?>
	</tbody>
</table>
<?php echo $this->paginationControl($this->postsPaginator, 'Sliding', '/dashboard/pagination_control.phtml'); ?>